package com.stek.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.stek.R;
import com.stek.main.MainService;
import com.stek.utils.SharePreferenceUtils;

public class BootReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
			if (SharePreferenceUtils.getPrefBoolean(context,
					context.getString(R.string.key_auto_lauch), true)) {
				context.startService(new Intent(context, MainService.class));
			}
			
		}
	}
}
